/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.rafkind.resrev.dao;

import com.rafkind.resrev.data.User;
import java.util.List;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author dave
 */
public interface UserDao {  
  User getUser(String loginName);
  User getUser(int id);  
  List<User> getAllUsers();
  List<User> getAllUsers(int first, int count, 
      String orderByAttribute, boolean ascending);
  int countAllUsers();
  
  @Transactional
  void saveUser(User user);
  
  @Transactional
  void deleteUser(User user);
  
  User authenticateUser(String loginName, String password);
  
  @Transactional
  void ensureAdminUserExists();  
}
